<html>
<head><meta charset="utf-8"><title>Pre commit hook · t-compiler/rust-analyzer · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/index.html">t-compiler/rust-analyzer</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Pre.20commit.20hook.html">Pre commit hook</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="228271833"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Pre%20commit%20hook/near/228271833" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Pre.20commit.20hook.html#228271833">(Mar 01 2021 at 17:33)</a>:</h4>
<p>Is anybody using our pre-commit hook?</p>



<a name="228271927"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Pre%20commit%20hook/near/228271927" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Pre.20commit.20hook.html#228271927">(Mar 01 2021 at 17:34)</a>:</h4>
<p>I want to  remove it, as I haven't used it for years -- creates more hassle when rustfmt fails to parse something</p>



<a name="228272571"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Pre%20commit%20hook/near/228272571" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Pre.20commit.20hook.html#228272571">(Mar 01 2021 at 17:37)</a>:</h4>
<p>there's a pre-commit hook?</p>



<a name="228272866"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Pre%20commit%20hook/near/228272866" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Pre.20commit.20hook.html#228272866">(Mar 01 2021 at 17:39)</a>:</h4>
<p>Iirc it invokes rustfmt right? I tried it once I think but got annoyed by how long it delayed the commit command so I removed it again</p>



<a name="228273011"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Pre%20commit%20hook/near/228273011" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Pre.20commit.20hook.html#228273011">(Mar 01 2021 at 17:39)</a>:</h4>
<p>No, I don't use it. Yeah, it's documented in <a href="https://github.com/rust-analyzer/rust-analyzer/tree/master/docs/dev#ci">https://github.com/rust-analyzer/rust-analyzer/tree/master/docs/dev#ci</a>.</p>



<a name="228273033"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Pre%20commit%20hook/near/228273033" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Edwin Cheng <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Pre.20commit.20hook.html#228273033">(Mar 01 2021 at 17:39)</a>:</h4>
<p>I remember that pre-commit hook was not working in Windows.</p>



<a name="228273558"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Pre%20commit%20hook/near/228273558" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Pre.20commit.20hook.html#228273558">(Mar 01 2021 at 17:42)</a>:</h4>
<p>I guess that answers my question...</p>



<a name="228275477"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Pre%20commit%20hook/near/228275477" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jeremy Kolb <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Pre.20commit.20hook.html#228275477">(Mar 01 2021 at 17:53)</a>:</h4>
<p>Remove it. It doesn't work on windows. Or at least my windows.</p>



<a name="228275487"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Pre%20commit%20hook/near/228275487" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Kirill Bulatov <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Pre.20commit.20hook.html#228275487">(Mar 01 2021 at 17:53)</a>:</h4>
<p>I use it actually, but fine without it either.</p>
<p>It also spoils the partial git add, I've spent half an hour the first time it occurred <span aria-label="smile" class="emoji emoji-1f642" role="img" title="smile">:smile:</span></p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>